package io.github.annyylxyms.gyncache.command;

import io.github.annyylxyms.gyncache.core.Command;
import io.github.annyylxyms.gyncache.core.GynCache;
import io.github.annyylxyms.gyncache.core.Reply;

/**
 *
 * @author Anny
 * @date 2025/1/15 16:55
 */
public class InfoCommand implements Command {
    private static final String INFO = "GynCache server[v1.0.1], created by Anny." + CRLF
            + "Mock Redis Server, at 2024-01-15 in Shanghai." + CRLF;

    @Override
    public String name() {
        return "INFO";
    }

    @Override
    public Reply<?> exec(GynCache cache, String[] args) {
        return Reply.bulkString(INFO);
    }
}
